//
//  DataBaseEntity.h
//  MovingLoaniOS
//
//  Created by Rain on 2018/8/23.
//  Copyright © 2018 - 2019 GWMFC. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DataBaseEntity : NSObject

@property (copy, nonatomic) NSString *typeID;
@property (copy, nonatomic) NSString *code;
@property (copy, nonatomic) NSString *pCode;
@property (copy, nonatomic) NSString *name;
@property (copy, nonatomic) NSString *param;

@property (strong, nonatomic) NSMutableArray *subEntities;

+ (NSMutableArray *)getFormattedEntitiesFor:(NSArray *)firstClassEntities
                               fromEntities:(NSArray *)allEntities;

+ (NSMutableArray *)getFirstClassEntitiesByTypeID:(NSString *)typeID;

+ (NSMutableArray *)getEntitiesByCode:(NSString *)code
                          inEntities:(NSArray *)entitiesInSearch;

+ (NSMutableArray *)getEntitiesByPcode:(NSString *)pcode
                            inEntities:(NSArray *)entitiesInSearch;

+ (NSMutableArray *)getAllEntitiesByTypeID:(NSString *)typeID;

+ (NSString *)getNameByCode:(NSString *)code WithTypeID:(NSString *)typeID;
+ (NSString *)getCodeByName:(NSString *)name WithTypeID:(NSString *)typeID;

@end
